package com.uzai.console.entity.es;

import com.uzai.common.utils.EsIndexName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * 企业微信群成员
 * @Auther: lucher
 * @Date: 2022/8/24 15:06
 * @Description:
 */

@Document(indexName = EsIndexName.UZAI_WORKWX_GROUP_MEMBER, shards = 3, replicas = 2)
@Data
public class EsWorkWxGroupMember implements Serializable {

    private static final long serialVersionUID = -1523715899429402514L;

    @ApiModelProperty("主键id：merId_groupWxid_wxid")
    @Id
    @Field(type = FieldType.Keyword)
    private String id;

    @ApiModelProperty("运营商id")
    @Field(type = FieldType.Long)
    private Long merId;

    @ApiModelProperty("企业微信独有字段，暂无用处，保留字段")
    @Field(type =  FieldType.Keyword)
    private String acctId;

    @ApiModelProperty("公司id,暂无用处，保留字段")
    @Field(type = FieldType.Keyword)
    private String corpId;

    @ApiModelProperty("群微信id")
    @Field(type = FieldType.Keyword)
    private String groupWxid;

    @ApiModelProperty("成员微信id")
    @Field(type = FieldType.Keyword)
    private String wxid;

    @ApiModelProperty("成员微信昵称")
    @Field(type = FieldType.Text)
    private String nick;

    @ApiModelProperty("成员头像")
    @Field(type = FieldType.Keyword)
    private String himg;

    @ApiModelProperty("成员群内昵称")
    @Field(type = FieldType.Text)
    private String nickRemark;

    @ApiModelProperty("性别（）")
    @Field(type = FieldType.Integer)
    private int sex;

    @ApiModelProperty("是否为管理员；0不是管理员；1是管理员")
    @Field(type = FieldType.Integer)
    private int isAdmin;

    @ApiModelProperty("最近发言时间")
    @Field(type = FieldType.Integer)
    private int recentSpeakTime;

    @ApiModelProperty("成员在群状态(0-离群；1-在群；2-被踢；3-黑名单)")
    @Field(type = FieldType.Integer)
    private int status;

    @ApiModelProperty("退群时间")
    @Field(type = FieldType.Integer)
    private int quitTime;

    @ApiModelProperty("踢群原因")
    @Field(type = FieldType.Text)
    private String quitReason;

    @ApiModelProperty("邀请人微信id")
    @Field(type = FieldType.Keyword)
    private String inviterWxid;

    @ApiModelProperty("成员类型(0-普通成员；1-机器人)")
    @Field(type = FieldType.Integer)
    private int type;

    @ApiModelProperty("创建时间")
    @Field(type = FieldType.Integer)
    private int createTime;

    @ApiModelProperty("修改时间")
    @Field(type = FieldType.Integer)
    private int updateTime;

    @ApiModelProperty("是否是内部成员，0否，1是")
    @Field(type = FieldType.Integer)
    private int employeeTag;


}
